package controller

import (
	"fmt"
	"net/http"
)

func Ping(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, "{\"ping\": \"ok\"}")
}


var iToken int
var ChToken chan int = make(chan int)

func Number(w http.ResponseWriter, r *http.Request) {
	select {
	case iToken = <- ChToken:
	default:
	}
	fmt.Fprintln(w, iToken)
}
